-- GENERATED SPELL FOR [Enraged Crusher] --


function spell0_18062(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_18062', 585, 1)
end

function spell1_18062(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(32015,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18062', 1000, 1)
end

function Sorts_18062(pUnit, Event)
local choix_sorts_18062 = math.random(0, 1)
if choix_sorts_18062 == 0 then
pUnit:RegisterEvent('spell0_18062', 1, 1)
end
if choix_sorts_18062 == 1 then
pUnit:RegisterEvent('spell1_18062', 1, 1)
end
end

function mob18062_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18062', math.random(1500, 3000), 1)
end

function mob18062_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18062_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18062_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18062, 1, 'mob18062_Action')
RegisterUnitEvent(18062, 2, 'mob18062_Leave')
RegisterUnitEvent(18062, 3, 'mob18062_Kill')
RegisterUnitEvent(18062, 4, 'mob18062_Die')
